package com.dingzhen.convert;

import org.elasticsearch.search.SearchHits;

import java.util.List;

public interface MessageConvert {
    /**
     * conver the serarch hits to the given class
     * @param hits the search hists
     * @param targetClass target class
     * @return the list for target class
     */
    <T> List<T> convert(SearchHits hits, Class<T> targetClass);
}
